class Point2d {
    constructor (x,y) {
	this.x = x;
	this.y = y;
    }

    distance () {
 	if (this.z == 0)
	    if (this.w > this.z)
		return this.w
	    else
		return this.z;
	if (this.b || this.c && this.d)
	    return 0
	else
	    return this.x * this.x + this.y * this.y;
    }
}

export {Point2d};
